package net.neptech.model.workflow;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author Saya
 * @Date 2025/8/22 14:13
 * @Description TODO
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "ins_assign_user_record")
@TableName("ins_assign_user_record")

public class InstanceAssignUserRecord {
    @TableField("id")
    @Id
    @TableId

    @GeneratedValue(strategy = GenerationType.UUID)
    private String id;
    /**
     * 流程id
     */
    @TableField("flow_id")
    private String flowId;

    /**
     * 流程实例id
     */
    @TableField("process_instance_id")
    private String processInstanceId;
    /**
     * 节点执行id
     */
    @TableField("parent_execution_id")
    private String parentExecutionId;
    /**
     * 表单数据
     */
    @TableField("data")
    private String data;
    @TableField("node_id")
    private String nodeId;
    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 节点状态
     */
    @TableField("status")
    private Integer status;

    /**
     * 开始时间
     */
    @TableField("start_time")
    private Date startTime;

    /**
     * 结束时间
     */
    @TableField("end_time")
    private Date endTime;

    /**
     * 执行id
     */
    @TableField("execution_id")
    private String executionId;

    /**
     * 任务id
     */
    @TableField("task_id")
    private String taskId;

    /**
     * 审批意见
     */
    @TableField("approve_desc")
    private String approveDesc;

    /**
     * 节点名称
     */
    @TableField("node_name")
    private String nodeName;

    /**
     * 任务类型
     */
    @TableField("task_type")
    private String taskType;

    /**
     * 表单本地数据
     */
    @TableField("local_data")
    private String localData;

    /**
     * 是否是自动完成
     */
    @TableField("auto")
    private Boolean auto;
    /**
     * 逻辑删除字段
     */
    @TableField("deleted")
    @Column(name = "deleted")
    private Boolean deleted;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Column(name = "update_time")
    private Date updateTime;
}
